package com.example.pgtest.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.pgtest.entity.NodeInfo;
import com.example.pgtest.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author WDK
 */
public interface UserMapper extends BaseMapper<User> {

  /**
   * 获取信息
   * @param method
   * @return
   */
  @Select("SELECT ${method}")
  String getInfo(@Param("method") String method);

  /**
   * 获取返回结果集
   * @param method
   * @param <T>
   * @return
   */
  @Select("fetch all in ${method}")
  <T> List<T> getData(@Param("method") String method);
}
